home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / source.exe / POSIX / SH / STD / STDC / STDDEF.H < prev    next >
C/C++ Source or Header  |  1992-07-13  |  630b  |  39 lines

  1. /* ANSI common definitions */
  2.  
  3. /* $Header$ */
  4.  
  5. #ifndef NULL
  6. #if __STDC__
  7. #define    NULL    (void*)0
  8. #else
  9. #define    NULL    0
  10. #endif
  11. #endif
  12.  
  13. #if ! _STDDEF_H
  14. #define    _STDDEF_H 1
  15.  
  16. /* doesn't really belong here, but the library function need it */
  17. #if __STDC__
  18. #define    ARGS(args)    args
  19. #define Void    void
  20. #define    Const    const
  21. #else
  22. #define    ARGS(args)    ()
  23. #define    Void    char
  24. #define    Const
  25. #endif
  26.  
  27. #ifdef sparc
  28. # include <sys/stdtypes.h>
  29. #else
  30. typedef unsigned size_t;        /* may need long */
  31. typedef int ptrdiff_t;
  32. #endif /* sparc */
  33. #define    offsetof(type,id) ((size_t)&((type*)NULL)->id)
  34.  
  35. extern    int errno;        /* really belongs in <errno.h> */
  36.  
  37. #endif
  38.  
  39.